<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>

    <script src="/resources/Scripts/jquery-1.8.3.min.js" type="text/javascript"></script>
    <script src="/resources/Scripts/jquery.easyui.min-1.3.5.js" type="text/javascript"></script>
    <script src="/resources/Scripts/jquery.datagrid.js" type="text/javascript"></script>
    <script src="/resources/Scripts/JScriptIndex.js" type="text/javascript"></script>
	<script src="/resources/Scripts/newadd.js" type="text/javascript"></script>
    <script src="/resources/Res/easyui/locale/easyui-lang-zh_CN.js" type="text/javascript"></script>
    <link href="/resources/Content/Default.css" rel="stylesheet" type="text/css" />
    <link href="/resources/Content/IndexStyle.css" rel="stylesheet" type="text/css" />
    <link href="/resources/Res/easyui/themes/icon.css" rel="stylesheet" type="text/css" />
    <link href="/resources/Res/easyui/themes/default/easyui.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../Res/My97DatePicker/WdatePicker.js"></script>
<style type="text/css">
.td1{
    border: 0px black solid;
    width: 80px;
    height: 60px;
    text-align: right;
}
.td2{
    border: 0px black solid;
    width: 150px;
    height: 60px;
    text-align: left;
}
put{
  width: 160px;
  height:20px;
}
.td3{
    width: 70px;
  
    height:30px;
    font-size:16px;
    line-height:30px;
    text-align: center;
    border:0;
    border-radius:15px 15px;
    box-shadow: 0 0 0 0;
    background:#eadfdf;
    font-style: oblique;
}
.td4{
	text-align: center;
}

</style>

<script type='text/javascript'>
	/* function ajaxFrom() {
		//progressComm();
		$.ajax({
			url : "/updateStudentDetail",
			type : "post",
			data : $('#form1').serialize(),
			dataType : "json",
			success : function(result) {
				console.log(result.msg)
				if (result.msg =='OK') {
					//alert("haha");
					window.location.href = 'javascript:history.go(-2)';
					
				}

			}
		});
	} */
	
	function ajaxFrom() {
		var form = new FormData(document.getElementById("form1"));
		
		$.messager.confirm('修改学员信息', '您确定要修改吗？', function(r){
			if (r){
				$.ajax({
					url : "/updateStudentDetail",
					type : "post",
					data:form,
	                processData:false,
	                contentType:false,
					success : function(result) {
						console.log(result.msg)
						if (result.msg =='OK') {
							//alert("haha");
							parent.location.reload();
							
						}

					}
				});
			}
		});
	}
</script>
</head>
<body>


 




 <form id="form1" action="#" method="post" enctype="multipart/form-data">
	<div style="width:900px;padding:10px;background:#fafafa;"    class="easyui-panel" title="修改学员信息">
	<table  style="width: 700px;height: 240px;">
		<tr>
		    <td class="td1"><label for="name">学员编号:</label></td>
			<td class="td2"><input type="text" id="name" name="stuId" value="${upStudent.stuId }" readonly="readonly"></td>
			<td class="td1"><label for="dang">档案编号:</label></td>
			<td class="td2"><input type="text" id="dang" name="stuRecoderId" value="${upStudent.stuRecoderId }" readonly="readonly"></td>
		</tr>
		<tr>
		    <td class="td1"><label for="stu">学员姓名:</label></td>
			<td class="td2"><input type="text" id="stu" name="stuName" value="${upStudent.stuName }"></td>
		    <td class="td1"><label for="dang">性别:</label></td>
			<td class="td2"><input type="text" id="dang" name="stuSex" value="${upStudent.stuSex }"></td>
		</tr>
		<tr>
		    <td class="td1"><label for="sex">身份证号:</label></td>
			<td class="td2"><input type="text" id="sex"  name="stuCardId" value="${upStudent.stuCardId }"></td>
			<td class="td1"><label for="photo">学员照片:</label></td>
			<td class="td2"><input type="file" style="width: 150px;" name="stuPhoto" value="${upStudent.stuPhoto }"></td>
		</tr>
		<tr>
		    <td class="td1"><label for="body">班别:</label></td>
			<td class="td2"><input type="text" id="body" name="stuClassType" value="${upStudent.stuClassType }"></td>
			<td class="td1"><label for="datet">当前阶段:</label></td>
			<td class="td2"><input type="text" id="datet" name="stuNowLicence" value="${upStudent.stuNowLicence }"></td>
		</tr>
		<tr>
		    <td class="td1"><label for="address">联系方式:</label></td>
			<td class="td2"><input type="text" id="address" name="stuPhone" value="${upStudent.stuPhone }"></td>
			<td class="td1"><label for="cla">准驾车型:</label></td>
			<td class="td2"><input type="text" id="cla" name="stuDriverType" value="${upStudent.stuDriverType }"></td>
		</tr>
		</table>
		<table style="width: 700px;height: 50px;">
		<tr>
		    <td class="td1"><label for="bz">备注:</label></td>
			<td class="td2"><textarea  id="bz" name="stuNote" value="${upStudent.stuReferees }" style="width: 440px;height: 40px"></textarea></td>
		</tr>
		</table>
		<table  style="width: 700px;height: 240px;">
		<tr>
		    <td class="td1"><label for="fee">申请类型:</label></td>
			<td class="td2"><input type="text" id="fee" name="stuApplicationType" value="${upStudent.stuApplicationType }"></td>
			<td class="td1"><label for="nw">应收费用:</label></td>
			<td class="td2"><input type="text" id="nw" name="stuShouldCharge" value="${upStudent.stuCharge }"></td>
		</tr>
		<tr>
			<td class="td1"><label for="now">实收费用:</label></td>
			<td class="td2"><input type="text" id="now" name="stuCharge" value="${upStudent.stuCharge }"></td>
			<td class="td1"><label for="ty">体检医院:</label></td>
			<td class="td2"><input type="text" id="ty" name="stuMedicaHospital" value="${upStudent.stuMedicaHospital }"></td>
			
		</tr>
		<tr>
		    <td class="td1"><label for="apply">工作单位:</label></td>
			<td class="td2"><input type="text" id="apply" name="stuWorkUnit" value="${upStudent.stuWorkUnit }"></td>
			<td class="td1"><label for="live">家庭住址:</label></td>
			<td class="td2"><input type="text" id="live" name="stuAddress" value="${upStudent.stuAddress }"></td>
			
		</tr>
		<tr>
		    <td class="td1"><label for="time">居住地址:</label></td>
			<td class="td2"><input type="text" id="time" name="stuResidenceAddress" value="${upStudent.stuResidenceAddress }"></td>
			<td class="td1"><label for="time">居住证号:</label></td>
			<td class="td2"><input type="text" id="time" name="stuResidenceId" value="${upStudent.stuResidenceId }"></td>
		</tr>
		<tr>
			<td class="td1"><label for="live">报名分校:</label></td>
			<td class="td2"><input type="text" id="live" name="stuAssignsSchool" value="${upStudent.stuAssignsSchool }"></td>
			<td class="td1"><label for="time">报名点:</label></td>
			<td class="td2"><input type="text" id="time" name="stuAssigns" value="${upStudent.stuAssigns }"></td>
			
		</tr>
		<tr>
		    <td class="td1"><label for="time">报名来源:</label></td>
			<td class="td2"><input type="text" id="time" name="stuAdmissions" value="${upStudent.stuAdmissions }"></td>
     		<td class="td1"><label for="phone">是否本地:</label></td>
			<td class="td2"><input type="text" id="phone" name="stuIsLocal" value="${upStudent.stuIsLocal }"></td>
			
		</tr>
		<tr>
		    <td class="td1"><label for="live">推荐人:</label></td>
			<td class="td2"><input type="text" id="live" name="stuReferees" value="${upStudent.stuReferees }"></td>
			<td class="td1"><label for="live">招生来源:</label></td>
			<td class="td2"><input type="text" id="live" name="stuOffer" value="${upStudent.stuOffer }"></td>
		</tr>
		
		
		<tr>
			<td class="td1"></td>
			<td class="td2 td4"><input type="button" onclick="ajaxFrom();" class="td3" value="修改" ></td>
			<td class="td1"><input type="reset" class="td3" value="取消"></td>
			<td class="td2 td4"><input type="button" class="td3" onclick="tabClose();" value="返回"></td>
		</tr>
	</table>
	</div>
	</form>
	<script type="text/javascript">
	 function tabClose() {
         parent.closeCurrTab();
     }
	</script>

	
</body>
</html>